Create Payment Code

Create payment code adalah transaksi permintaan Payment Code yang dilakukan oleh merchant saat customer melakukan checkout, Payment Code merupakan id bayar pada saat customer melakukan pembayaran di ATM Bersama. Message yang digunakan adalah XML dengan metode POST.


Request Message Format

No Name Type Status Length Description
1 type String M 50 Type of data that requested by Merchant, filled in accordance with the type of ongoing transactions:
Value: reqpaymentcode
2 bookingid String M 25 Booking ID / Invoice ID (Received From Merchant, Unique)
3 clientid String M 50 Client ID that use by merchant for identified each customer (Receive From merchant, Unique)
4 customer_name String M 25 Customer name in which bookingid is attached to.
5 amount int M 12 Amount that customer should pay (should numeric, excluding decimal point).
For example:
IDR 1.892.221 will be denoted as 1892221
6 productid String M 20 Product id from Merchant (must unique on merhant’s side).
7 interval int M 5 Interval of transaction based on minute (max 99999 minute).
8 username String M 25 Given merchant user name provided by Artajasa.
9 booking_datetime String M 19 Transmission local date and time of the transaction. (GMT+7).
Format: YYYY-MM-dd hh:mm:ss
10 signature String M 32 Signature will use MD5 with the component below:
MD5(username+password+bookingID)
Username and password for sandbox will be provided when when you receive email approval registering as merchant.


Response Message Format

No Name Type Status Length Description
1 type String M 50 Value: respaymentcode
2 ack String M 2 Response Code of this transaction, Here is the list of response code of the transaction:
1. 00 = Transaction Success
2. 01 = Illegal Signature
3. 02 = Error Tag XML
4. 03 = Error Content Type
5. 04 = Error Content Length
6. 05 = Error Accessing Database
3 Bookingid/InvoiceId int M 25 Booking ID/InvoiceId (Received From Merchant, Unique)
4 vaid int M 12 Payment Code that allocated for bookingid for Customer
5 bankcode int M 3 Artajasa internal code
6 signature String M 32 Signature will use MD5 with the component below :
MD5(username+password+bookingID)


Berikut di bawah ini adalah contoh message XML Create Payment Code:

Request XML:

<?xml version="1.0" ?>
<data>
    <type>reqpaymentcode</type>
    <bookingid>123456789</bookingid>
    <clientid>1</clientid>
    <customer_name>Faisal</customer_name>
    <amount>1000000</amount>
    <productid>01</productid>
    <interval>120</interval>
    <username>partner</username>
    <booking_datetime>2011-11-08 20:20:33</booking_datetime>
    <signature>9bb575179ef43032d7dee3e57bbb5575</signature>
</data>


Response XML:

<?xml version="1.0" ?>
<Return>
    <type>respaymentcode</type>
    <ack>00</ack>
    <bookingid>123456789</bookingid>
    <vaid>500100123456</vaid>
    <bankcode>987</bankcode>
    <signature>9bb575179ef43032d7dee3e57bbb5575</signature>
</Return>